import { Button } from "@/components/ui/button"
import "./index.css"
import { useNavigate } from "react-router-dom"


const Login = () => {
    const navigate=useNavigate()
    const loginFunc = () => {
        const  obj = {name:'123'}
        const str = JSON.stringify(obj)
        window.localStorage.setItem('name',str)
        window.localStorage.setItem('name2','cj')
        const ss = window.localStorage.getItem('name3')
        console.log(ss,'ss');
        navigate('/home')
    }
    
    return (
        <div className="login">
            <Button onClick={loginFunc}> 
                登录
            </Button>
        </div>
    )
}

export default Login